import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { MessageService } from '../../core/service';

@Component({
  selector: 'app-menu',
  templateUrl: './menu.component.html',
  styleUrls: ['./menu.component.scss']
})
export class MenuComponent implements OnInit {
  @Input()
  url: string;


  @Output()
  menuEvent: EventEmitter<string> = new EventEmitter<string>();

  constructor(
    private msg: MessageService
  ) { }

  ngOnInit() {
    // this.url='/'+ this._router.url.split('/')[3];

    this.msg.getMessage().subscribe((e) => {
      this.url = e.text;
      // this.msg.clearMessage();
    });
  }
  public change(e) {

  }
}
